package cn.epsilon3.page;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 分页请求主要参数
 *
 * @author epsilon3
 * @date 2023/07/17
 *
 */
@Data
@NoArgsConstructor
public class PageParam {

    @NotNull(message = "分页参数错误")
    @Min(value = 1,message = "分页参数错误")
    @ApiModelProperty(value = "分页页数",required = true,example = "1")
    private int pageNumber;

    @NotNull(message = "分页参数错误")
    @Min(value = 1,message = "分页参数错误")
    @ApiModelProperty(value = "分页页数",required = true,example = "10")
    private int pageSize;
}
